Sub Mis_PDFs()
    Dim Temp As String, Linea As Single, Desti As Single
    Dim Ruta As String, Centro As String, Rango As String

    Application.ScreenUpdating = False
    Application.EnableEvents = False

    Ruta = ThisWorkbook.Path & "\"

    Sheets.Add After:=ActiveSheet    ' -- creo una hoja

    Temp = ActiveSheet.Name         ' -- Busco el nombre

    Sheets("Hoja1").Select          ' - Selecciona la hoja de plantillas

    Linea = 9
    Desti = 1

    While Cells(Linea, 7) <> ""
        Sheets(Temp).Cells(Desti, 1) = Cells(Linea, 7) ' --- Centro
        Sheets(Temp).Cells(Desti, 2) = Linea           ' --- Linea
        Linea = Linea + 70
        Desti = Desti + 1
        DoEvents
    Wend

    ' ---&--- Ahora ordeno la tabla de la hoja que he creado

    Sheets(Temp).Select
    Columns("A:B").Select

    ActiveWorkbook.Worksheets(Temp).Sort.SortFields.Clear

    ActiveWorkbook.Worksheets(Temp).Sort.SortFields.Add _
                                    Key:=Range("A:A"), _
                                    SortOn:=xlSortOnValues, _
                                    Order:=xlAscending, _
                                    DataOption:=xlSortNormal

    ActiveWorkbook.Worksheets(Temp).Sort.SortFields.Add _
                                    Key:=Range("B:B"), _
                                    SortOn:=xlSortOnValues, _
                                    Order:=xlAscending, _
                                    DataOption:=xlSortNormal

    With ActiveWorkbook.Worksheets(Temp).Sort
        .SetRange Range("A:B")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Range("A1").Select

    ' ---&--- Ahora creamos PDF

    ' --- Tomo los datos del primero

    Centro = Cells(1, 1)
    Rango = "A" & Cells(1, 2) - 8 & ":B" & Cells(1, 2) + 61
    Linea = 2

    While Cells(Linea, 1) <> ""
       If Centro = Cells(Linea, 1) Then
          Rango = Rango & ",A" & Cells(Linea, 2) - 8 & ":B" & Cells(Linea, 2) + 61
       Else
          Call Crea_PDF(Ruta, Centro, Rango, Temp)
          Centro = Cells(Linea, 1)
          Rango = "A" & Cells(Linea, 2) - 8 & ":B" & Cells(Linea, 2) + 61
       End If
       Linea = Linea + 1: DoEvents
    Wend

    ' ---&---  Imprimo el ultimo

    Call Crea_PDF(Ruta, Centro, Rango, Temp)

    ' ---&---  Borro la hoja temporal

    Sheets(Temp).Delete
    Sheets("Hoja1").Select
    Range("A1").Select

    Application.ScreenUpdating = True
    Application.EnableEvents = True

    MsgBox "Macro finalizara", vbInformation + vbOKOnly, "Crear PDF"
End Sub

' ---&---  Crea el PDF

Sub Crea_PDF(Ruta, Centro, Rango, Temp)
    Sheets("Hoja1").Select
    Range(Rango).Select

    Selection.ExportAsFixedFormat Type:=xlTypePDF, _
                                  Filename:=Ruta & Centro, _
                                  Quality:=xlQualityStandard, _
                                  IncludeDocProperties:=True, _
                                  IgnorePrintAreas:=False, _
                                  OpenAfterPublish:=False
    Sheets(Temp).Select
End Sub
